<!doctype html>
<html >
<head>
<include file="Public:headinc" />
<include file="Public:pagestyle" />
</head>
<body>
	<div class="y-container">
		<div class="y-pagetitle">
			列表
		</div>
		<div class="y-toolbar">
			<a href="{:U('Article/addArticle')}" class="y-btn"><span>添加</span></a>
		</div>
		<div class="y-list">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<th >编号</th>
					<th >标题</th>
					<th >分类</th>
					<th >作者</th>
					<th >发布时间</th>
					<th >是否推荐</th>
					<th >浏览量</th>
					<th >操作</th>
				</tr>
<?php for($i=0,$c=count($data); $i<$c; $i++) { ?>
<tr >
	<td>{$data[$i]['id']}</td>
	<td>{$data[$i]['title']}</td>
	<td>{$data[$i]['typename']}</td>
	<td>{$data[$i]['author']}</td>
	<td>{:date('Y-m-d H:i:s', $data[$i]['posttime'])}</td>
	<td><?php echo '1' == $data[$i]['isrecommend'] ? '是' : '否';?></td>
	<td>{$data[$i]['viewnum']}</td>
	<td>
		<a href="{:U('Article/editArticle', 'id='.$data[$i]['id'])}">编辑</a>&nbsp;&nbsp;
		<a href="{:U('Article/delArticle', 'id='.$data[$i]['id'])}" onclick="return confirm('确实要删除吗')">删除</a>
	</td>
</tr>
<?php } ?>			
			</table>
<div class="page">
{$pageString}
</div>
		</div>
		<div class="y-toolbar">
			<a href="{:U('Article/addArticle')}" class="y-btn"><span>添加</span></a>
		</div>
	</div>
</body>
</html>
